import React, { Component } from 'react'
import {HashRouter as Router ,Route} from "react-router-dom"
import Index from "./components/index/index"
import Category from "./components/category/category"
import Cart from "./components/cart/cart"
import My from "./components/my/my"
import Tabbar from "./components/tabbar/tabbar"
import SearchCenter from "./components/searchCenter/searchCenter"
import GoodDetail from "./components/goodDetail/goodDetail"
import GoodList from  "./components/goodList/goodList"
export default class RouterConfig extends Component {
  render() {
    return (
      <div>
        <Router>
          <Route path="/" exact render={()=><Tabbar><Index></Index></Tabbar>}></Route>
          <Route path="/cart" exact render={()=><Tabbar><Cart></Cart></Tabbar>}></Route>
          <Route path="/category" exact render={()=><Tabbar><Category></Category></Tabbar>}></Route>
          <Route path="/my" exact render={()=><Tabbar><My></My></Tabbar>}></Route>
          <Route path="/searchCenter" exact render={()=><SearchCenter></SearchCenter>}></Route>
          <Route path="/goodDetail/:goods_id" exact render={(props)=><GoodDetail {...props}></GoodDetail>}></Route>
          <Route path="/goodList/:query" exact render={(props)=><GoodList {...props}></GoodList>}></Route>
        </Router>
      </div>
    )
  }
}
